package com.csesteel.crm.domain;

import org.hibernate.annotations.*;
import org.hibernate.annotations.Cache;

import javax.persistence.*;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Set;

/**
 * Created by Administrator on 2015/5/20 0020.
 */
@Entity
@Table(name="crm_tb_menu")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class CrmMenu implements Serializable {
    private static final long serialVersionUID = 48L;
    @Id
    @Column(name="menu_id")
    private Integer menuId;

    @Column(name="menu_name")
    private String menuName;

    @Column(name="menu_url")
    private String menuUrl;

    @Column(name="menu_parent")
    private String menuParent;

//    @OneToMany(cascade = CascadeType.ALL)
//    @JoinTable(name = "crm_r_menu_priviledge", joinColumns = { @JoinColumn(name = "menu_id", referencedColumnName = "menu_id") }, inverseJoinColumns = { @JoinColumn(name = "priviledge_id", referencedColumnName = "priviledge_id") })
//    private Set<CrmPriviledge> menusPriviledge;

    public Integer getMenuId() {
        return menuId;
    }

    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getMenuUrl() {
        return menuUrl;
    }

    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl;
    }

    public String getMenuParent() {
        return menuParent;
    }

    public void setMenuParent(String menuParent) {
        this.menuParent = menuParent;
    }

//    public Set<CrmPriviledge> getMenusPriviledge() {
//        return menusPriviledge;
//    }
//
//    public void setMenusPriviledge(Set<CrmPriviledge> menusPriviledge) {
//        this.menusPriviledge = menusPriviledge;
//    }
}
